android.ndk.surface_texture

@file surface_texture.h

Members

Functions

ASurfaceTexture_acquireANativeWindow
ANativeWindow* ASurfaceTexture_acquireANativeWindow(ASurfaceTexture* st)

Returns a reference to an ANativeWindow (i.e. the Producer) for this SurfaceTexture. This is equivalent to Java's: Surface sur = new Surface(surfaceTexture);

ASurfaceTexture_attachToGLContext
int ASurfaceTexture_attachToGLContext(ASurfaceTexture* st, uint texName)

Attach the SurfaceTexture to the OpenGL ES context that is current on the calling thread. A new OpenGL ES texture object is created and populated with the SurfaceTexture image frame that was current at the time of the last call to {@link #detachFromGLContext}. This new texture is bound to the GL_TEXTURE_EXTERNAL_OES texture target.

ASurfaceTexture_detachFromGLContext
int ASurfaceTexture_detachFromGLContext(ASurfaceTexture* st)

Detach the SurfaceTexture from the OpenGL ES context that owns the OpenGL ES texture object. This call must be made with the OpenGL ES context current on the calling thread. The OpenGL ES texture object will be deleted as a result of this call. After calling this method all calls to {@link #updateTexImage} will fail until a successful call to {@link #attachToGLContext} is made.

ASurfaceTexture_getTimestamp
long ASurfaceTexture_getTimestamp(ASurfaceTexture* st)

Retrieve the timestamp associated with the texture image set by the most recent call to updateTexImage.

ASurfaceTexture_getTransformMatrix
void ASurfaceTexture_getTransformMatrix(ASurfaceTexture* st, ref float[16] mtx)

Retrieve the 4x4 texture coordinate transform matrix associated with the texture image set by the most recent call to updateTexImage.

ASurfaceTexture_release
void ASurfaceTexture_release(ASurfaceTexture* st)

Release the reference to the native ASurfaceTexture acquired with ASurfaceTexture_fromSurfaceTexture(). Failing to do so will result in leaked memory and graphic resources. \param st A ASurfaceTexture reference acquired with ASurfaceTexture_fromSurfaceTexture()

ASurfaceTexture_updateTexImage
int ASurfaceTexture_updateTexImage(ASurfaceTexture* st)

Update the texture image to the most recent frame from the image stream. This may only be called while the OpenGL ES context that owns the texture is current on the calling thread. It will implicitly bind its texture to the GL_TEXTURE_EXTERNAL_OES texture target.

Structs

ASurfaceTexture
struct ASurfaceTexture

IMPORTANT NOTICE:

Meta